
package makai.event.filter;

import makai.image.MakaiImage;
import makai.image.MakaiImageMask;

/**
 * A Filter is an advanced tool which can be accessed by the user
 * from the menu bar.  They generally apply to an entire layer, and
 * can have numerous settings and complexity.
 * 
 * @author Krechevskoy
 * @version 0.0
 */
public interface Filter{
    
    /**
     * Initializes needed objects and attributes.
     */
    public void load();
    
    /**
     * Returns the name of this Filter
     */
    public void getName();
    
    /**
     * Called to show the settings dialog to the user.
     * NOTE: If the filter has no settings, simply return true
     * 
     * @return If the settings have been successfully applied
     */
    public boolean showDialog(MakaiImage preview);
    
    /**
     * Applies the filter to the given image
     * 
     * @param image The image to apply the filter to
     * 
     * @return The resulting image
     */
    public boolean applyFilter(MakaiImage image);
    
    /**
     * Applies the filter to the given image
     * 
     * @param image The image to apply the filter to
     * @param mask The mask to apply to the filter
     * 
     * @return The resulting image
     */
    public MakaiImage applyFilter(MakaiImage image, MakaiImageMask mask);
    
}